#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/wait.h>
int main(int argc , char * argv[])
{
    int status;
    pid_t pid = fork();
    if(pid == 0)
    {
        puts("Hi ,I am a child precess1");
        return 3;
    }
    else
    {
        printf("child process ID %d \n",pid);
        pid = fork();
        if(pid ==0)
        {
            puts("Hi ,I am a child precess2");
            exit(7);
        }
        else
        {
            wait(&status);
            if(WIFEXITED(status))
                printf("Child send one : %d \n",WIFEXITED(status));
            
            wait(&status);
            if(WIFEXITED(status))
                printf("Child send two : %d \n",WIFEXITED(status));
            sleep(30);
        }
    }   
    return 0;
}